const KoaRouter = require("@koa/router");
const { verifyAuthorization } = require("../middleware/login.middleware");
const { multerUploadAvatar } = require("../middleware/file.middleware");
const fileController = require("../controller/file.controller");

const fileRouter = new KoaRouter({ prefix: "/file" });

// 上传头像
fileRouter.post("/upload/avatar", verifyAuthorization, multerUploadAvatar, fileController.uploadAvatar);

module.exports = fileRouter;
